package com.hyl.person;

import com.hyl.Transport;

import java.security.cert.TrustAnchor;

/**
 * @description:
 * @author: molar
 * @date: Created in 2020/5/18 10:11
 * @version: v1.0
 * @modified By:
 */
public class Person {
    private String id;
    private String name;
    private String sex;

    public void driveMethod(Transport transport) {
        System.out.println("驾驶员：" + this.name + "(" + this.id + ")" + "  " + this.sex);
        transport.driveMethod();
        System.out.println("座驾具体id为：" + transport.getId());
    }

    public void load(Transport transport) {
        transport.load();
    }

    public void maintain(Transport transport) {
        transport.maintain();
    }

    public void addGas(Transport transport) {
        transport.addGas();
    }

    public Person() {
    }

    public Person(String id, String name, String sex) {
        this.id = id;
        this.name = name;
        this.sex = sex;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
